package temp;

import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.image.BufferedImage;
import java.io.File;

import javax.imageio.ImageIO;
import javax.swing.JFrame;
import javax.swing.JWindow;

public class DemoImagen
{
	public static void main(String[] args)
	{
		try
		{
			BufferedImage img = ImageIO.read(new File("a.jpg"));
			JWindow w = new JWindow(new JFrame());
			
			Dimension dim = w.getToolkit().getScreenSize();
			
			w.getContentPane().setLayout(new BorderLayout());
			w.getContentPane().add(new FullImage(img,dim.width,dim.height),BorderLayout.CENTER);
			
			w.setSize(dim.width,dim.height);
			w.setVisible(true);
		}
		catch(Exception e)
		{
			e.printStackTrace();
			throw new RuntimeException(e);
		}
		
	}
}
